package Demo01;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28463
 * Date: 2022—06—22
 * Time: 15:02
 */
class MyArray<T> {
    public T[] array = (T[]) new Object[10];

    public T getPos(int pos) {
        return this.array[pos];
    }
    public void setval(int pos,T val) {
        this.array[pos] = val;
    }
    public T[] getArray() {
        return array;
    }
}
public class Test01 {
    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();
        System.out.println(myArray);
        MyArray<String> myArray2 = new MyArray<>();
        System.out.println(myArray2);
    }
}
